package com.woniu.customer.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniu.customer.entity.Customer;
import com.woniu.customer.entity.GoodOrder;
import com.woniu.customer.entity.Goods;
import com.woniu.customer.entity.vo.CustomerVO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

@Repository
public interface CustomerMapper extends BaseMapper<Customer> {
    /**
     * 平台：通过多种属性查找用户
     * @return
     */
    List<Customer> selectCustomer(CustomerVO customerVO);

    /**
     * 修改个人资料
     * @param customer
     */
    void updateCustomerinformation(Customer customer);

    /**
     * 查找所有商品
     * @return
     */
    List<Goods> selectGoodList();

    /**
     * 兑换商品，扣减积分
     * @param phone
     * @param grade
     */
    void cutGoodGrade(String phone,Integer grade);

}
